//
//  LoginRegisterInfoSubmitView.swift
//  GLUZSwift
//
//  Created by xyanl on 2025/3/7.
//  Copyright © 2025 考拉🐨. All rights reserved.
//

import UIKit
import Reusable
import Localize_Swift

extension LoginRegisterInfoSubmitView: NibLoadable {}

class LoginRegisterInfoSubmitView: UIView {
    
    @IBOutlet weak var submitButton: UIButton!
    @IBOutlet weak var remarkLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        submitButton.backgroundColor = .gradient(colors: [
            UIColor(hex: "#278AFF"),
            UIColor(hex: "#66D6E2")
        ], rect: CGRect(x: 0, y: 0, width: xScreenW - 48, height: 48))
        submitButton.addRoundedCorners(radius: 24)
        
        /// 监听语言的变化
        NotificationCenter.default.addObserver(self, selector: #selector(updateLanguageAction), name: NSNotification.Name(LCLLanguageChangeNotification), object: nil)
        updateLanguageAction()
    }


    // 更新语言
    @objc private func updateLanguageAction() {
        
        remarkLabel.text = "注：身份、国籍确定后不可修改，请您根据实际情况进行选择".localized(.login)
        submitButton.setTitle("确定".localized(.login), for: .normal)
    }
    
    
    
}
